import requests

from api.get_header import get_header


class AddEmpAPI(object):
    def add_emp(self,req_header,req_body):
        resp = requests.post(url="http://ihrm2-test.itheima.net/api/sys/user",
                             headers=req_header,
                             json=req_body)
        return resp

if __name__ == '__main__':

    emp=AddEmpAPI()
    req_header = get_header()
    req_body = {"username":"张三四","mobile":"16578777657","workNumber":"007"}
    resp = emp.add_emp(req_header,req_body)
    print(resp.json())
